<template>
  <jc-bar
    :customStyle="{ backgroundColor: 'transparent' }"
    :prve-btn="true"
    :search-btn="true"
    @prve="$router.replace({ path: '/home' })"
    color="none"
  >
    <v-spacer></v-spacer>
    <span class="text-title">原创赞美</span>
    <v-spacer></v-spacer>
  </jc-bar>
  <v-container class="px-0 py-0">
    <v-list style="background-color: transparent !important">
      <template v-for="(item, index) in items" :key="index">
        <v-list-item class="bg-transparent" @click="toDetail(item)" :prepend-avatar="item.thumbnails">
          <v-list-item-title class="text-title">{{ item.name }}</v-list-item-title>
        </v-list-item>
      </template>
    </v-list>
  </v-container>
</template>
<script>
import JcBar from "@/layout/JcBar.vue";
import BackageContainer from "@/layout/BackageContainer.vue";
import { getShiJiList } from "@/api/original-poetry";
export default {
  name: "OriginalPoetry",
  components: {
    BackageContainer,
    JcBar,
  },
  data() {
    return {
      items: [],
    };
  },
  mounted() {
    // this.$jcLoading.show();
    getShiJiList()
      .then((res) => {
        console.log(res);
        this.items = res.rows;
      })
      .finally(() => {
        // this.$jcLoading.close();
      });
  },
  methods: {
    toDetail(item) {
      this.$router.push("/original_poetry_detail/" + item.id);
    },
  },
};
</script>
